package xgenerator.jdbc;

public interface Transaction {

	/**
	 * <p>
	 * Title：判断事务是否有效
	 * </p>
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 * @return
	 */
	public boolean isActive();
	
	/**
	 * Begin Transaction
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 */
	public void begin();
	
	/**
	 * Commit Transaction
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 */
	public void commit();
	
	/**
	 * Rollback Transaction
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 */
	public void rollback();
	
	/**
	 * Add Transaction
	 * @author <a href="mailto:shushanlee@msn.com">liss</a>
	 * @param transaction
	 */
	public void addTransaction(Transaction transaction);

}
